﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lion.WeiXin.Core.Models
{
   public class OrderModel:BaseModel
    {

       public OrderModel()
       {
           OrderItems = new List<Order_DetailsModel>();
       }
       
        private string _code;
        private decimal _total;
        private string _buyer;
        private DateTime _lastupdatedate;
      
        /// <summary>
        /// 订单编号
        /// </summary>
        public string Code
        {
            set { _code = value; }
            get { return _code; }
        }       
        /// <summary>
        /// 预付款
        /// </summary>
        public decimal PrePay { get; set; }
      
        /// <summary>
        /// 总金额
        /// </summary>
        public decimal Total
        {
            set { _total = value; }
            get { return _total; }
        }
        /// <summary>
        /// 实收
        /// </summary>
        public decimal Payment { get; set; }

        /// <summary>
        /// 支付方式 计次卡，储值卡
        /// </summary>
        public string PayType { get; set; }
       
        /// <summary>
        ///  购买人（ 卡号）
        /// </summary>
        public string Buyer
        {
            set { _buyer = value; }
            get { return _buyer; }
        }

        /// <summary>
        /// 购买人姓名，扩展字段
        /// </summary>
        public string BuyerName { get; set; }

       /// <summary>
       /// 购买人电话
       /// </summary>
        public string Buyer_Phone { get; set; }

        /// <summary>
        /// 客户备注，填写接引地址
        /// </summary>
        public string Buyer_Note { get; set; }

        /// <summary>
        /// 客户预约时间：
        /// </summary>
        public DateTime Buyer_Appointment { get; set; }

       /// <summary>
       /// 状态: 0 结单，1已支付，2待支付，3 废单
       /// </summary>
        public int Status { get; set; }
       /// <summary>
       /// 订单来源： 微信订单，前台订单
       /// </summary>
        public string ComeFrom { get; set; }
       /// <summary>
       /// 状态中文名称
       /// </summary>
        public string StatusName
        {
            get
            {
                OrderStateEnum odrState = (OrderStateEnum)this.Status;
                return odrState.ToString();
            }
        }


        /// <summary>
        /// 
        /// </summary>
        public DateTime LastUpdateDate
        {
            set { _lastupdatedate = value; }
            get { return _lastupdatedate; }
        }

        /// <summary>
        /// 订单详细
        /// </summary>
        public List<Order_DetailsModel> OrderItems;
    }
}
